<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>作品展示 - 随手拍活动 - {$Config.sitename}</title>
    <link rel="stylesheet" href="__CSS__/suipai.css" />
    <link rel="stylesheet" href="__HOMECSS__/global.css" />
    <script type="text/javascript" src="__HOMEJS__/jquery-1.7.2.min.js"></script>
</head>
<body>
    <Admintemplate file="Toppic/Suipai/header"/>

    <div class="body_wrap"> 
        <div class="shownav">
            <span class="fl">参赛作品展示 —— <em>秀烘焙 , 传快乐</em></span>
            <span class="fr"><a href="__WEBURL__/user/bake/suipaiadd?t=toppic" target="_blank"><img src="__IMAGE__/up_btn.jpg" alt=""/></a></span>
        </div>
        <a name="list"></a>
        <div class="shnav">
            <a href="__WEBURL__/toppic/suipai/show#list" <if condition="$sort eq '' && $type eq ''"> class="act" </if>>最新上传</a>
            <a href="__WEBURL__/toppic/suipai/show?type=daren#list" <if condition="$type eq 'daren'"> class="act" </if>>勤奋达人</a>
            <a href="__WEBURL__/toppic/suipai/show?sort=msg#list" <if condition="$sort eq 'msg'"> class="act" </if>>互动留言</a>
            <a href="__WEBURL__/toppic/suipai/show?sort=rq#list" <if condition="$sort eq 'rq'"> class="act" </if>>人气</a>
        </div>

        <div class="wklist">
            <empty name="list"><div class="nodata">暂无参赛作品</div></empty>
            <if condition="$type eq ''">

                <foreach name="list" item="vo">
                    <div class="list">
                        <ul>
                            <li class="img"><a href="__WEBURL__/suipai/{$vo.id}"><img src="__FILESURL__{$vo.image}" alt="{$vo.title}"/></a></li>
                            <li class="uhead"><a href="__WEBURL__/u/{$vo.openuid}"><img src="{$vo.uavatar|getUavatar}" /></a></li>
                            <li class="title"><a href="__WEBURL__/suipai/{$vo.id}">{$vo.title}</a></li>
                            <li class="other">
                                <span class="rq"><a href="__WEBURL__/suipai/{$vo.id}">人气: {$vo.clicknum}</a></span>
                                <span class="ly"><a href="__WEBURL__/suipai/{$vo.id}#msg">留言: {$vo.msgnum}</a></span>
                                <span> &nbsp;|&nbsp;&nbsp; </span>
                                <span>作品数: {$vo.worknum}</span>
                            </li>
                        </ul>
                    </div>
                </foreach>

            <else/>
            <foreach name="list" item="vo">
            <div class="list">
                <ul>
                    <li class="img"><a href="__WEBURL__/suipai/{$vo.workid}"><img src="__FILESURL__{$vo.suipai.image}" alt="{$vo.suipai.title}"/></a></li>
                    <li class="uhead"><a href="__WEBURL__/u/{$vo.user.openuid}"><img src="{$vo.user.uavatar|getUavatar}" /></a></li>
                    <li class="title"><a href="__WEBURL__/suipai/{$vo.id}">{$vo.suipai.title}</a></li>
                    <li class="other">
                        <span class="rq"><a href="__WEBURL__/suipai/{$vo.workid}">人气: {$vo.suipai.clicknum}</a></span>
                        <span class="ly"><a href="__WEBURL__/suipai/{$vo.workid}#msg">留言: {$vo.suipai.msgnum}</a></span>
                        <span> &nbsp;|&nbsp;&nbsp; </span>
                        <span>作品数: {$vo.worknum}</span>
                    </li>
                </ul>
            </div>
            </foreach>
                </if>

            <div class="clear"></div>
            <div class="pager">{$Page}</div>

        </div>

    </div>

    <div class="blankbtm mt40"></div>



    <Admintemplate file="Home/Public/footer"/>

    <script type="text/javascript">
        $(function(){
            $(".img img").each(function(i){
                var img = $(this);
                var realWidth;//真实的宽度
                var realHeight;//真实的高度
                //这里做下说明，$("<img/>")这里是创建一个临时的img标签，类似js创建一个new Image()对象！
                $("<img/>").attr("src", $(img).attr("src")).load(function() {
                    realWidth = this.width;
                    realHeight = this.height;
                    if(realHeight>400){
                        var margintop=(realHeight/2-200)/2;
                        img.css('marginTop','-'+margintop+'px');
                    }
                });
            });
        })
    </script>
</body>
</html>